package java51.demo18;

import java.util.*;

public class ArrTest {

	public static void main(String[] args) {
		int[] a = { 4, 6, 7, 100, 454, 3, 34, 3 };
		System.out.println(Arrays.toString(a));
		Arrays.sort(a);
		System.out.println(Arrays.toString(a));
		Dog d[] = { new Dog("李晓涛", "黄", 21), new Dog("李大涛", "黄", 20),
				new Dog("大黄", "黑", 3), new Dog("哮天犬", "白", 10000),
				new Dog("小黑", "黑", 5) };
		System.out.println(Arrays.toString(d));
		Arrays.sort(d);
		System.out.println("对象排序后：");
		System.out.println(Arrays.toString(d));

		System.out.println(">>>>>>>>>>>>>>>>>>");
		List list = new ArrayList();
		list.add(new Dog("李晓涛", "黄", 21));
		list.add(new Dog("李大涛", "黄", 20));
		list.add(new Dog("大黄", "黑", 3));
		list.add(new Dog("哮天犬", "白", 10000));
		list.add(new Dog("小黑", "黑", 5));
		Object o = Collections.max(list);
		System.out.println("最大的是" + o);
		Collections.sort(list);
		System.out.println("排序后：");
		System.out.println(list);
		// List找到最小的对象 min
	}

}
